package com.lilingguo.easyserver.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * 服务端属性类
 *
 * @Author: 黎铃果
 * @Date: 2020/05/28 16:32
 */
@Data
@Component
@ConfigurationProperties(
        prefix = "easyserver.server"
)
public class ServerProperties {

    /**
     * 自我保护机制，默认开启
     */
    private boolean selfProtection = true;
    /**
     * 清理服务间隔，默认30s
     */
    private int clearRate = 30000;
    /**
     * 存储方式，默认内存存储
     */
    private String storageMode = "default";
    /**
     * 持久化文件路径
     */
    private String dataPersistencePath = null;

}
